home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0833.dms / q0833.adf / FlowChartMacros / FlowChartTool_Box.arexx < prev    next >
Text File  |  1997-04-10  |  3KB  |  118 lines

  1. /* FlowChartTool_Box*/
  2. /* A SuperMacro by Steven. R. Giovenella, 5823 Dutchess Dr., Colorado Springs, CO 
  3. 80918.  © Copyright 1994 Steven. R. Giovenella, All rights reserved. 
  4. This macro is my gift to the Amiga community.  It may be given away freely to 
  5. anyone, but it may NOT be sold in any way, shape, or form, not even for the cost of 
  6. reproduction, shipping, or handling, without express written permission from the 
  7. author.  This macro may NOT be added to any disk which is to be sold for any price 
  8. or fee, to include shipping and handling.  The ONLY way this macro may be 
  9. distributed is on a disk which is given away 100% free of all charges, or via 
  10. telecommunications networks which do not charge any additional fee as a result of a 
  11. user downloading this particular macro, although general fees for access to the 
  12. telecommunications system as a whole are acceptable.  This macro may only 
  13. bereproduced in its entirety, including all comment lines and code.  The individual 
  14. user may alter this macro for personal use, but may not then distribute the macro 
  15. in any modified form.  If you wish, feel free to send me some money, a Christmas 
  16. card, some other piece of software, or absolutely nothing as a gift for creating this 
  17. macro.  The author of this software is not responsible for any data loss or damage to 
  18. computer equipment as a result, direct or indirect, of the use of this macro. */
  19.  
  20. Options results
  21.  
  22. /* Set maxwidth of box margins */
  23. SectionSetup TOP 1 BOTTOM 1 INSIDE 2.25 OUTSIDE 2.25 COLUMNS 4
  24. Justify CENTER
  25. Hypen  ON
  26. Hotzone .05
  27.  
  28. /* Find Range to Use */
  29. Status LinePos
  30.     PARSE VAR Result BegLine BegPos EndLine EndPos
  31.  
  32. maxwidth=0
  33. cumheight=0
  34. range=EndLine-BegLine+1
  35.  
  36. DO i=1 to range
  37.     linenum=BegLine+i-1
  38.     MoveToLine linenum 0
  39.     Status LineHeight
  40.         lh=Result
  41.     Status Fontname
  42.         fname=Result
  43.     Status FontSize
  44.         fsize=Result
  45.     TextBlockTypePrefs SIZE fsize FONT fname
  46.     ShiftDOWN
  47.     CtrlDOWN
  48.     Cursor DOWN
  49.     Extract
  50.         textline=Result
  51.     ShiftUP
  52.     CtrlUP
  53.     yspot=.25+cumheight
  54.     xspot=1.75
  55.     DrawTextBlock 1 xspot yspot textline
  56.     CurrentObject
  57.         obj.i=Result
  58.     cumheight=cumheight+lh    *.85
  59.     IF i=1 THEN DO
  60.         FirstObject SELECTED
  61.             firstobj=Result
  62.         END
  63.     END
  64.  
  65. newcumheight=0
  66. DO i=1 to range
  67.     GetObjectCoords obj.i
  68.         PARSE VAR Result page left top width height
  69.     newxpos=4.25-.5*width
  70.     newypos=(.75-.5*cumheight)+newcumheight
  71.     newcumheight=height+newcumheight
  72.     SetObjectCoords obj.i page newxpos newypos width height
  73.     END
  74. SelectObject
  75.  
  76. /* Draw box around text */
  77. boxheight=0
  78. DO FOREVER
  79.     boxheight=boxheight+.125
  80.     IF boxheight>newcumheight THEN leave
  81.     END
  82. boxheight=boxheight+.125
  83. BoxPrefs LINEWT 2 FILL solid TEXTFLOW none FILLCOLOR white
  84. DrawBox page 3.75 (.75-.5*boxheight)  1.0 boxheight
  85. ObjectToBack
  86. i=i+1
  87. CurrentObject
  88.     obj.i=Result
  89. BoxPrefs LINEWT 2 FILL solid TEXTFLOW none FILLCOLOR black
  90. DrawBox page 3.8125 (.8125-.5*boxheight) 1.0 boxheight
  91. ObjectToBack
  92. i=i+1
  93. CurrentObject
  94.     obj.i=Result
  95. BoxPrefs LINEWT 2 FILL solid TEXTFLOW none FILLCOLOR white
  96. GraphicTool
  97. DO i=1 to (range+3)
  98.     SelectObject obj.i MULTIPLE
  99.     END
  100. Group
  101. Cut
  102. TextTool
  103.  
  104. /* Paste into FlowChart section */
  105. /* Goto FlowChart section or create one */
  106. SectionSetup NEWNAME "Main"
  107. GotoSection "FlowChart"
  108. GetSectionSetup NAME 
  109. IF Result~="FlowChart" THEN DO
  110.     NewSection Text Name "FlowChart" AFTER
  111.     GotoSection "FlowChart"
  112.     END
  113.  
  114. Paste
  115. GraphicTool
  116. redraw
  117. ObjectToFront
  118.